"""
 +----------------------------------------------------------------------+   
 |  Copyright (C) 2008 crodas,czayas                                    |      
 |                                                                      |
 |  Except where otherwise indicated,                                   |
 |  this program is free software; you can redistribute it and/or       |
 |  modify it under the terms of the GNU General Public License         |
 |  as published by the Free Software Foundation; either version 2      |
 |  of the License, or (at your option) any later version.              |
 |                                                                      |
 |  This program is distributed in the hope that it will be useful,     |
 |  but WITHOUT ANY WARRANTY; without even the implied warranty of      |
 |  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the       |
 |  GNU General Public License for more details.                        |
 |                                                                      |
 |  You should have received a copy of the GNU General Public License   |
 |  along with this program; if not, write to the Free Software         |
 |  Foundation, Inc., 59 Temple Place - Suite 330,                      |
 |  Boston, MA  02111-1307, USA.                                        |
 +----------------------------------------------------------------------+
 |  Authors:                                                            |
 |      Carlos Zayas <czayas@etopapy.org>                               |
 |      Cesar Rodas <crodas@etopapy.org>                                |
 +----------------------------------------------------------------------+
"""
import os
try:
    import win32api,string
    import win32file,win32wnet
except:
    print "You need to download 'Python for Windows Extensions'"
    print "You get it free from http://python.net/crew/mhammond/win32"
    print "It is mandaroy you to download this package in order to use,"
    print "under a not free OS"    


            
def getfilespath():
    """
        Return all the files in m$os, 
    """
    def drives():
        """
        Returns an array with all drives letters and type.
        """
        foo=[]
        drives=win32api.GetLogicalDriveStrings()
        drives=string.splitfields(drives,'\000')
        drivetype={win32file.DRIVE_CDROM:"cdrom",
               win32file.DRIVE_FIXED:"fixed",
               win32file.DRIVE_NO_ROOT_DIR:"no_root_dir",
               win32file.DRIVE_RAMDISK:"ramdisk",
               win32file.DRIVE_REMOTE:"remote",
               win32file.DRIVE_REMOVABLE:"removable",
               win32file.DRIVE_UNKNOWN:"unknown"}
        for d in drives:
            if d:
                # foo[d] = drivetype[win32file.GetDriveType(d)]
                if win32file.GetDriveType(d) == win32file.DRIVE_FIXED:
                    foo.append( d );
        return foo 
    
    return drives()
